<h2>Lista przedmiotów:</h2>
<table>
<tr>
	<th>Nazwa przedmiotu</th>
	<th title="pojemność zespołów">P.Z.</th>
        <th title="Kolor na planie">Kolor</th>
        <th>Sala</th>
        <th>Prowadzący</th>
        <th>Dzień</th>
        <th>Tydzień</th>
        <th>Start</th>
        <th>Koniec</th>
</tr>
<form action="" method="post">
<input type="hidden" name="editData" value="1" />
{foreach from=$subjects item=std}
<tr>

<td><input type="hidden" name="type[]" value="edit" />
<input type="hidden" name="subjectID[]" value="{$std.subjectID}" readonly="readonly"/>
<input type="text" name="name[]" value="{$std.name}" class="textlong"/></td>
<td><input type="text" name="groups[]" value="{$std.groups}" class="year" /></td>
<td><select name="color[]">
        {foreach from=$colors item=color}
        <option value="{$color}" style="background: {$color}" {if $color == $std.color}selected="selected"{/if}>{$color}</option>
        {/foreach}
    </select>
</td>
<td><input type="text" name="room[]" class="year" value="{$std.room}" /></td>
<td><input type="text" name="teacher[]" class="name" value="{$std.teacher}" /></td>
<td>{html_options name="day[]" options=$days selected=$std.day}</td>
<td>{html_options name="week[]" options=$week selected=$std.week}</td>
<td>{html_options name="start[]" options=$hours class="timeStart" selected=$std.start}</td>
<td>{html_options name="end[]" options=$hours class="timeStart" selected=$std.end}</td>
<td><a href="?admin,subjects,del,{$std.subjectID}"><img src="_gfx/admin_drop.png" alt="usuń" title="usuń"/></a></td>

</tr>
{/foreach}
<tr><td><input type="submit" value="aktualizuj" /></td></tr>
</form>
<tr><td>Dodaj:</td></tr>
<tr>
<form action="" method="post">
<td><input type="hidden" name="type" value="add" />
<input type="text" name="name" class="textlong" />
<td><input type="text" name="groups" class="year" /></td>
<td>
    <select name="color">
        {foreach from=$colors item=color}
        <option value="{$color}" style="background: {$color}">{$color}</option>
        {/foreach}
    </select>
</td>
<td><input type="text" name="room" class="year" /></td>
<td><input type="text" name="teacher" class="name" /></td>
<td>{html_options name="day" options=$days}</td>
<td>{html_options name="week" options=$week}</td>
<td>{html_options name="start" options=$hours class="timeStart"}</td>
<td>{html_options name="end" options=$hours class="timeEnd"}</td>

<td><input type="submit" value="Dodaj" /></td>

</form>
</tr>
</table>